<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src='./lib/openseadragon/openseadragon.js' ></script>
  <script src='./lib/loading/loading.js'></script>
  <script src='./js/util.js' type='text/javascript'></script>
  <script src='./core/Store.js'></script>
  <script src='./core/CaMic.js'></script>
  <script src='./lib/openseadragon-imaginghelper.min.js'></script>
  <!-- <script src='./js/init.js'></script> -->
  <title>Document</title>
  <style>
    #main_viewer {
      width:500px;
      height:500px;
      border:black 2px solid;
    }
  </style>
</head>
<body>
  <div id="main_viewer"></div>
  <script>
    //
    $D = {};
    // get slide id from url
    $D.params = getUrlVars();
    let opt = {
      showNavigator: false // don't show up the navigator
    };
    // load if we have at least one slide query element
    if ($D.params && $D.params.slideId) {
      // create CaMic by options
      $CAMIC = new CaMic("main_viewer", {id:$D.params.slideId}, opt);
      // load image/slide
      $CAMIC.loadImg(function (e) {
        // do something after image loaded.
        console.log(e);
      });
    }
    else {
      document.write('pass in slide id') // ?slideId=uiddddddddddddd
    }
  </script>
</body>
</html>
